package com.dvd.djc.gdjc003;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import com.dvd.common.CommonAction;

public class GDJC003Action extends Action {

	@Override
	public ActionForward execute(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		CommonAction.New(request,this.servlet);
		String action = request.getParameter("action");
		
		if(action.equals("addNew"))
		{
			return this.addNew(mapping,  form,
					 request,response);
		}
		else if(action.equals("toDvdList"))
		{
			return this.toDvdList(mapping,form,
					 request,response);
		}
		else
		{
			assert("action Invalid" == null);
			return null;
		}
	}
	
	public ActionForward addNew(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
	{
		return new ActionForward("/GDJC002.do?action=new");
	}
	public ActionForward toDvdList(ActionMapping mapping, ActionForm form,
	HttpServletRequest request, HttpServletResponse response)
	{
		return new ActionForward("/GDJK001.do?action=paging");
	}
	

}
